]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 29 Nov 2013 00:45:39 +0000 (01:45 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 16 Dec 2013 17:27:19 +0000 (18:27 +0100)
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567

30 files changed:
js/gdm/loginDialog.js
js/gdm/util.js
js/ui/altTab.js
js/ui/animation.js
js/ui/appDisplay.js
js/ui/background.js
js/ui/components/automountManager.js
js/ui/components/telepathyClient.js
js/ui/dash.js
js/ui/dnd.js
js/ui/endSessionDialog.js
js/ui/keyboard.js
js/ui/layout.js
js/ui/lookingGlass.js
js/ui/main.js
js/ui/messageTray.js
js/ui/notificationDaemon.js
js/ui/osdWindow.js
js/ui/overview.js
js/ui/panel.js
js/ui/pointerWatcher.js
js/ui/screenShield.js
js/ui/scripting.js
js/ui/status/accessibility.js
js/ui/switcherPopup.js
js/ui/viewSelector.js
js/ui/windowManager.js
js/ui/workspace.js
js/ui/workspaceSwitcherPopup.js
js/ui/workspaceThumbnail.js

index 4389fe7ecdfd964baf20812fede31ce96334148b..d2c44ad3f3bfe50a4bf295f8c9d112a7d88d37f8 100644 (file)
@@ -644,7 +644,7 @@ const LoginDialog = new Lang.Class({
                            onComplete: function() {
                                Mainloop.idle_add(Lang.bind(this, function() {
                                    this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
-                                   return false;
+                                   return GLib.SOURCE_REMOVE;
                                }));
                            },
                            onCompleteScope: this });
@@ -699,6 +699,7 @@ const LoginDialog = new Lang.Class({
                                                                      function() {
                                                                          this._timedLoginAnimationTime -= _TIMED_LOGIN_IDLE_THRESHOLD;
                                                                          hold.release();
+                                                                         return GLib.SOURCE_REMOVE;
                                                                      });
         return hold;
     },
index 66852fd271c2bb2bb56116d92ba45c899345c5e8..425b16ed5a9a266621ba337bb95a26f1230fa578 100644 (file)
@@ -250,6 +250,7 @@ const ShellUserVerifier = new Lang.Class({
                                                        Lang.bind(this, function() {
                                                            this._messageQueueTimeoutId = 0;
                                                            this._queueMessageTimeout();
+                                                           return GLib.SOURCE_REMOVE;
                                                        }));
     },
 
index b39cc817e8083d2c7fb215dc551adc1ee6222472..525adc2607e5bf762ad056663630b6b0992f1318 100644 (file)
@@ -2,6 +2,7 @@
 
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
@@ -312,7 +313,7 @@ const AppSwitcherPopup = new Lang.Class({
             this._createThumbnails();
         this._thumbnailTimeoutId = 0;
         this._thumbnailsFocused = false;
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _destroyThumbnails : function() {
@@ -547,7 +548,7 @@ const AppSwitcher = new Lang.Class({
                                                         Lang.bind(this, function () {
                                                                             this._enterItem(index);
                                                                             this._mouseTimeOutId = 0;
-                                                                            return false;
+                                                                            return GLib.SOURCE_REMOVE;
                                                         }));
         } else
            this._itemEntered(index);
index fb72e74e06e9fabca91d708f40942217ba06e19e..9773542b836ca97055207df94150f0768faa5288 100644 (file)
@@ -1,5 +1,6 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const St = imports.gi.St;
@@ -59,7 +60,7 @@ const Animation = new Lang.Class({
 
     _update: function() {
         this._showFrame(this._frame + 1);
-        return true;
+        return GLib.SOURCE_CONTINUE;
     },
 
     _animationsLoaded: function() {
index 357fcfb6f9252a40ec8c83f93c975d5bc9b57a11..360dc00083876ca3dd7ab9b8c1cd1c14d544728c 100644 (file)
@@ -1370,7 +1370,7 @@ const AppIcon = new Lang.Class({
                 Lang.bind(this, function() {
                     this._menuTimeoutId = 0;
                     this.popupMenu();
-                    return false;
+                    return GLib.SOURCE_REMOVE;
                 }));
         } else if (button == 3) {
             this.popupMenu();
index 20a3a40303b7958e7395b34bde7322cfb73c9d05..5eab83aa7882cdfa3f57ef6b24d95523747cb318 100644 (file)
@@ -262,6 +262,7 @@ const BackgroundCache = new Lang.Class({
             if (params.onLoaded) {
                 GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
                     params.onLoaded(this._animation);
+                    return GLib.SOURCE_REMOVE;
                 }));
             }
         }
@@ -276,6 +277,7 @@ const BackgroundCache = new Lang.Class({
                            if (params.onLoaded) {
                                GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
                                    params.onLoaded(this._animation);
+                                   return GLib.SOURCE_REMOVE;
                                }));
                            }
                        }));
@@ -375,7 +377,7 @@ const Background = new Lang.Class({
 
         GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
             this.emit('loaded');
-            return false;
+            return GLib.SOURCE_REMOVE;
         }));
     },
 
@@ -517,7 +519,7 @@ const Background = new Lang.Class({
                                                       Lang.bind(this, function() {
                                                                     this._updateAnimationTimeoutId = 0;
                                                                     this._updateAnimation();
-                                                                    return false;
+                                                                    return GLib.SOURCE_REMOVE;
                                                                 }));
     },
 
index c19fbf6b7c427f050e7daa3b2e1f527b2a204094..64b745e8e8f5b1401e61817ee1249284ad5bf864 100644 (file)
@@ -77,7 +77,7 @@ const AutomountManager = new Lang.Class({
         }));
 
         this._mountAllId = 0;
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _onDriveConnected: function() {
@@ -236,7 +236,7 @@ const AutomountManager = new Lang.Class({
     _allowAutorunExpire: function(volume) {
         Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, function() {
             volume.allowAutorun = false;
-            return false;
+            return GLib.SOURCE_REMOVE;
         });
     }
 });
index b24791df8c401e980aab9d2fe71e0091324de112..56fc2d0fd50bf957a42f97727a4b9bf64d847418 100644 (file)
@@ -675,7 +675,7 @@ const ChatSource = new Lang.Class({
 
         this._notifyTimeoutId = 0;
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     // This is called for both messages we send from
@@ -975,7 +975,7 @@ const ChatNotification = new Lang.Class({
 
         this._filterMessages();
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     appendAliasChange: function(oldAlias, newAlias) {
@@ -1013,7 +1013,7 @@ const ChatNotification = new Lang.Class({
 
         this.source.setChatState(Tp.ChannelChatState.PAUSED);
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _onEntryChanged: function() {
index 3c5e89d81a458f0748edf9279ed203c051735c91..dfe8710ca5df38b3573425629d2161f5eb57fbd2 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Signals = imports.signals;
 const Lang = imports.lang;
 const Meta = imports.gi.Meta;
@@ -577,7 +578,7 @@ const Dash = new Lang.Class({
                         this._labelShowing = true;
                         item.showLabel();
                         this._showLabelTimeoutId = 0;
-                        return false;
+                        return GLib.SOURCE_REMOVE;
                     }));
                 if (this._resetHoverTimeoutId > 0) {
                     Mainloop.source_remove(this._resetHoverTimeoutId);
@@ -594,7 +595,7 @@ const Dash = new Lang.Class({
                     Lang.bind(this, function() {
                         this._labelShowing = false;
                         this._resetHoverTimeoutId = 0;
-                        return false;
+                        return GLib.SOURCE_REMOVE;
                     }));
             }
         }
index 042cd195e86dcfcbb0e51ff4e75ac9df2d4eab43..246d69557ecc0e1f1c5b2dab243a8d3d315b881d 100644 (file)
@@ -362,7 +362,7 @@ const _Draggable = new Lang.Class({
                 let result = motionFunc(dragEvent);
                 if (result != DragMotionResult.CONTINUE) {
                     global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
-                    return false;
+                    return GLib.SOURCE_REMOVE;
                 }
             }
         }
@@ -380,13 +380,13 @@ const _Draggable = new Lang.Class({
                                                              0);
                 if (result != DragMotionResult.CONTINUE) {
                     global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
-                    return false;
+                    return GLib.SOURCE_REMOVE;
                 }
             }
             target = target.get_parent();
         }
         global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _queueUpdateDragHover: function() {
index 1d43d211f4f745f97431802e8f6c259a5798a6a5..b8dbf36b891e2866709ea90970f03008cd652213 100644 (file)
@@ -411,7 +411,7 @@ const EndSessionDialog = new Lang.Class({
                 this._secondsLeft = this._totalSecondsToStayOpen - secondsElapsed;
                 if (this._secondsLeft > 0) {
                     this._sync();
-                    return true;
+                    return GLib.SOURCE_CONTINUE;
                 }
 
                 let dialogContent = DialogContent[this._type];
@@ -419,7 +419,7 @@ const EndSessionDialog = new Lang.Class({
                 this._confirm(button.signal);
                 this._timerId = 0;
 
-                return false;
+                return GLib.SOURCE_REMOVE;
             }));
     },
 
index 008253e0d16644b73918cb23541d6f974c9a1197..b95535563663f64567839038d2839fda8f65981d 100644 (file)
@@ -252,7 +252,10 @@ const Keyboard = new Lang.Class({
 
         if (!this._showIdleId)
             this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE,
-                                             Lang.bind(this, function() { this.Show(time); }));
+                                             Lang.bind(this, function() {
+                                                 this.Show(time);
+                                                 return GLib.SOURCE_REMOVE;
+                                             }));
     },
 
     _createLayersForGroup: function (gname) {
@@ -479,6 +482,7 @@ const Keyboard = new Lang.Class({
                                                    Lang.bind(this, function() {
                                                        this._clearKeyboardRestTimer();
                                                        this._show(monitor);
+                                                       return GLib.SOURCE_REMOVE;
                                                    }));
     },
 
@@ -504,6 +508,7 @@ const Keyboard = new Lang.Class({
                                                    Lang.bind(this, function() {
                                                        this._clearKeyboardRestTimer();
                                                        this._hide();
+                                                       return GLib.SOURCE_REMOVE;
                                                    }));
     },
 
index c74033b94dfe2cce0d66a4516935b91d062b46f0..13c480801740c557a2d5fa1d1099203f9604e3b8 100644 (file)
@@ -622,7 +622,7 @@ const LayoutManager = new Lang.Class({
         // when the system is bogged down
         GLib.idle_add(GLib.PRIORITY_LOW, Lang.bind(this, function() {
             this._startupAnimation();
-            return false;
+            return GLib.SOURCE_REMOVE;
         }));
     },
 
@@ -1039,7 +1039,7 @@ const LayoutManager = new Lang.Class({
             workspace.set_builtin_struts(struts);
         }
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     }
 });
 Signals.addSignalMethods(LayoutManager.prototype);
index 158321364fb370d0ffaed4f31e735802cec3279f..bbf35eb330f4af950390a97323a55cac21038bff 100644 (file)
@@ -841,6 +841,7 @@ const LookingGlass = new Lang.Class({
            this._timeoutId = Mainloop.timeout_add(500, Lang.bind(this, function () {
                 gcIcon.icon_name = 'gnome-fs-trash-full';
                 Mainloop.source_remove(this._timeoutId);
+                return GLib.SOURCE_REMOVE;
            }));
         }));
 
index cf1a9a43b9c6a79a7022e322dba87fda9b9d7203..fba752b5b2562a73f4afdb187397d836d67c406e 100644 (file)
@@ -609,7 +609,7 @@ function queueDeferredWork(workId) {
         _deferredTimeoutId = Mainloop.timeout_add_seconds(DEFERRED_TIMEOUT_SECONDS, function () {
             _runAllDeferredWork();
             _deferredTimeoutId = 0;
-            return false;
+            return GLib.SOURCE_REMOVE;
         });
     }
 }
index f905768d6cc80bbbc8997f41153dd13483d9ecea..afcfdca1983258a3cca3281f32f440224fa036d3 100644 (file)
@@ -1988,23 +1988,23 @@ const MessageTray = new Lang.Class({
         this._trayDwellTimeoutId = 0;
 
         if (Main.layoutManager.bottomMonitor.inFullscreen)
-            return false;
+            return GLib.SOURCE_REMOVE;
 
         // We don't want to open the tray when a modal dialog
         // is up, so we check the modal count for that. When we are in the
         // overview we have to take the overview's modal push into account
         if (Main.modalCount > (Main.overview.visible ? 1 : 0))
-            return false;
+            return GLib.SOURCE_REMOVE;
 
         // If the user interacted with the focus window since we started the tray
         // dwell (by clicking or typing), don't activate the message tray
         let focusWindow = global.display.focus_window;
         let currentUserTime = focusWindow ? focusWindow.user_time : 0;
         if (currentUserTime != this._trayDwellUserTime)
-            return false;
+            return GLib.SOURCE_REMOVE;
 
         this.openTray();
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _onNotificationKeyRelease: function(actor, event) {
@@ -2334,7 +2334,7 @@ const MessageTray = new Lang.Class({
             this._updateNotificationTimeout(0);
             this._updateState();
         }
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _escapeTray: function() {
@@ -2667,7 +2667,7 @@ const MessageTray = new Lang.Class({
 
         this._lastSeenMouseX = x;
         this._lastSeenMouseY = y;
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _hideNotification: function(animate) {
index d6f983d0cd6a560758c66b7389726b118d1853ee..46107808e3b32cbd2cd0093ce1720924a86761c1 100644 (file)
@@ -247,7 +247,7 @@ const FdoNotificationDaemon = new Lang.Class({
             Mainloop.idle_add(Lang.bind(this,
                                         function () {
                                             this._emitNotificationClosed(id, NotificationClosedReason.DISMISSED);
-                                            return false;
+                                            return GLib.SOURCE_REMOVE;
                                         }));
             return invocation.return_value(GLib.Variant.new('(u)', [id]));
         }
index 24f78b45d731ff6bb1e0d6cfc4204d96e2e77a82..773960c9eb9e0a3b63f1a6a64c4b0550802ae135 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const St = imports.gi.St;
 
 const Lang = imports.lang;
@@ -173,6 +174,7 @@ const OsdWindow = new Lang.Class({
                               Meta.enable_unredirect_for_screen(global.screen);
                            })
                          });
+        return GLib.SOURCE_REMOVE;
     },
 
     _reset: function() {
index 1809fe491ac7296f1d7be4bd8792b78f41969a31..eb0690a0663da761f113d96c3c48fa88293c34ed 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const Mainloop = imports.mainloop;
@@ -369,7 +370,7 @@ const Overview = new Lang.Class({
                                                                     this._windowSwitchTimestamp);
                                                 this.hide();
                                                 this._lastHoveredWindow = null;
-                                                return false;
+                                                return GLib.SOURCE_REMOVE;
                                             }));
         }
 
index 2337a63bdca0c0d8911d794171e208a0e1809088..08d823ec8cc92dc82736b0471198b54841cc04c1 100644 (file)
@@ -628,6 +628,7 @@ const ActivitiesButton = new Lang.Class({
 
         Mainloop.source_remove(this._xdndTimeOut);
         this._xdndTimeOut = 0;
+        return GLib.SOURCE_REMOVE;
     }
 });
 
index 87b4b7431c0feb465a78119d98f7c8131a8cb812..5eb6718bdbef81fbd6a6b5d7ac6b7817f4a30c02 100644 (file)
@@ -1,5 +1,6 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
@@ -110,7 +111,7 @@ const PointerWatcher = new Lang.Class({
 
     _onTimeout: function() {
         this._updatePointer();
-        return true;
+        return GLib.SOURCE_CONTINUE;
     },
 
     _updatePointer: function() {
index 9d00b6adfed2dc6846505e9b7c243fc5dd7071cf..2321759f0466768b8ae4c56e8303851a546978ee 100644 (file)
@@ -752,7 +752,7 @@ const ScreenShield = new Lang.Class({
                              });
         }
 
-        return true;
+        return GLib.SOURCE_CONTINUE;
     },
 
     _onDragBegin: function() {
@@ -848,7 +848,7 @@ const ScreenShield = new Lang.Class({
                                                        Lang.bind(this, function() {
                                                            this._lockTimeoutId = 0;
                                                            this.lock(false);
-                                                           return false;
+                                                           return GLib.SOURCE_REMOVE;
                                                        }));
         }
 
@@ -1110,6 +1110,7 @@ const ScreenShield = new Lang.Class({
 
             Mainloop.timeout_add(1000 * MANUAL_FADE_TIME, Lang.bind(this, function() {
                 this._activateFade(this._shortLightbox, MANUAL_FADE_TIME);
+                return GLib.SOURCE_REMOVE;
             }));
         } else {
             if (params.fadeToBlack)
index edfe49d3b9a986f2438c8ef80363aa58f6f5370b..8c8e3a34a979342b2dfd480548e3e2c665c3a9cb 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
@@ -41,7 +42,7 @@ function sleep(milliseconds) {
     Mainloop.timeout_add(milliseconds, function() {
                              if (cb)
                                  cb();
-                             return false;
+                             return GLib.SOURCE_REMOVE;
                          });
 
     return function(callback) {
index 81c37bf619abc2d59e0ff44c589bda5ac46fa77a..1ed9bf62bc8df5fb7ab0d5cd0fe2d0b4075b25f9 100644 (file)
@@ -2,6 +2,7 @@
 
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const St = imports.gi.St;
@@ -94,7 +95,7 @@ const ATIndicator = new Lang.Class({
 
         this.actor.visible = alwaysShow || items.some(function(f) { return !!f.state; });
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _queueSyncMenuVisibility: function() {
index e6036b089a0bea1b198b723dc2d54631cbe04f9c..2e3a72074dd80815b8be0b5ef30131a45faa85bd 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
@@ -163,6 +164,7 @@ const SwitcherPopup = new Lang.Class({
                                                                Main.osdWindow.cancel();
                                                                this.actor.opacity = 255;
                                                                this._initialDelayTimeoutId = 0;
+                                                               return GLib.SOURCE_REMOVE;
                                                            }));
         return true;
     },
@@ -251,6 +253,7 @@ const SwitcherPopup = new Lang.Class({
     _mouseTimedOut: function() {
         this._motionTimeoutId = 0;
         this.mouseActive = true;
+        return GLib.SOURCE_REMOVE;
     },
 
     _popModal: function() {
index 75ef3ad836c45d7481a1de94cf8a737756ef8713..e75f7c9b59a4f28363d996202c4ad9acb711bc8e 100644 (file)
@@ -2,6 +2,7 @@
 
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
@@ -461,6 +462,8 @@ const ViewSelector = new Lang.Class({
 
         this._searchResults.setTerms(terms);
         this._showPage(this._searchPage);
+
+        return GLib.SOURCE_REMOVE;
     },
 
     getActivePage: function() {
index 75be4c53b384212fd6614a4585f40b7fce2d414d..cbff2b0ef88cd45a2c0fc8841da7696ac7239899 100644 (file)
@@ -106,11 +106,11 @@ const DisplayChangeDialog = new Lang.Class({
             /* mutter already takes care of failing at timeout */
             this._timeoutId = 0;
             this.close();
-            return false;
+            return GLib.SOURCE_REMOVE;
         }
 
         this._descriptionLabel.text = this._formatCountDown();
-        return true;
+        return GLib.SOURCE_CONTINUE;
     },
 
     _onFailure: function() {
@@ -278,7 +278,7 @@ const WorkspaceTracker = new Lang.Class({
         workspace._keepAliveId = Mainloop.timeout_add(duration, Lang.bind(this, function() {
             workspace._keepAliveId = 0;
             this._queueCheckWorkspaces();
-            return false;
+            return GLib.SOURCE_REMOVE;
         }));
     },
 
@@ -290,7 +290,7 @@ const WorkspaceTracker = new Lang.Class({
                 workspace._lastRemovedWindow = null;
                 this._queueCheckWorkspaces();
             }
-            return false;
+            return GLib.SOURCE_REMOVE;
         }));
     },
 
index 34090de3e79b023fa5cbdb4310e59dec7f5a20e4..a8b2417cd82f0601169b34935034272a4eb2e462 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
@@ -472,7 +473,7 @@ const WindowOverlay = new Lang.Class({
             Mainloop.idle_add(Lang.bind(this,
                                         function() {
                                             this._windowClone.emit('selected');
-                                            return false;
+                                            return GLib.SOURCE_REMOVE;
                                         }));
         }
     },
@@ -554,7 +555,7 @@ const WindowOverlay = new Lang.Class({
             !this.closeButton.has_pointer)
             this._animateInvisible();
 
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     hideCloseButton: function() {
@@ -1222,18 +1223,18 @@ const Workspace = new Lang.Class({
             // store current cursor position
             this._cursorX = x;
             this._cursorY = y;
-            return true;
+            return GLib.SOURCE_CONTINUE;
         }
 
         let actorUnderPointer = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
         for (let i = 0; i < this._windows.length; i++) {
             if (this._windows[i].actor == actorUnderPointer)
-                return true;
+                return GLib.SOURCE_CONTINUE;
         }
 
         this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
         this._repositionWindowsId = 0;
-        return false;
+        return GLib.SOURCE_REMOVE;
     },
 
     _doRemoveWindow : function(metaWin) {
@@ -1308,7 +1309,7 @@ const Workspace = new Lang.Class({
                                                 metaWin.get_compositor_private() &&
                                                 metaWin.get_workspace() == this.metaWorkspace)
                                                 this._doAddWindow(metaWin);
-                                            return false;
+                                            return GLib.SOURCE_REMOVE;
                                         }));
             return;
         }
index 4005d77ebadafd90f016c8cc9273835033688d8a..cf3042192bde19f22782d6a7120197a61a233c0e 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta  = imports.gi.Meta;
@@ -156,6 +157,7 @@ const WorkspaceSwitcherPopup = new Lang.Class({
                                             onComplete: function() { this.destroy(); },
                                             onCompleteScope: this
                                            });
+        return GLib.SOURCE_REMOVE;
     },
 
     destroy: function() {
index 237998376f3fb053e3da8f4f5f8c34e82bb4b78d..c3f7e00e181a253d0044c64e4eec445c5aeda567 100644 (file)
@@ -2,6 +2,7 @@
 
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
@@ -325,7 +326,7 @@ const WorkspaceThumbnail = new Lang.Class({
                                                 metaWin.get_compositor_private() &&
                                                 metaWin.get_workspace() == this.metaWorkspace)
                                                 this._doAddWindow(metaWin);
-                                            return false;
+                                            return GLib.SOURCE_REMOVE;
                                         }));
             return;
         }